package Model;

import java.io.*;

public class Model {
	static public String FIRST_NAME = "firstName";
	static public String LAST_NAME = "lastName";
	static public String HOME_ADDRESS = "homeAddress";
	static public String COMPANY_ADDRESS = "companyAddress";
	static public String PERSONAL_MOBILE_PHONE = "personalMobilePhone";
	static public String PERSONAL_HOME_PHONE = "personalHomePhone";
	static public String PRO_MOBILE_PHONE = "proMobilePhone";
	static public String PRO_OFFICE_PHONE = "proOfficePhone";
	static public String HOMEPAGE = "homePage";
	static public String PRO_EMAIL = "proEmail";
	static public String PERSONAL_EMAIL = "personalEmail";
	static public String OTHER_IM = "otherIM";
	static public String OTHER_SKYPE = "otherSkype";
	static public String GROUP = "group";
	static public String PICTURE_PATH = "picturePath";
	
	static public int LAST_NO_CONTACT = 1;
	//Code taken from Java Code Geeks at http://examples.javacodegeeks.com/core-java/io/file/4-ways-to-copy-file-in-java/
	public static void copyFileUsingFileStreams(File source, File dest) throws IOException {
		InputStream input = null;
		OutputStream output = null;
		try {
			input = new FileInputStream(source);
			output = new FileOutputStream(dest);
			byte[] buf = new byte[1024];
			int bytesRead;
			while ((bytesRead = input.read(buf)) > 0) {
				output.write(buf, 0, bytesRead);
			}
		} finally {
			input.close();
			output.close();
		}
	}
}
